import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useTabBarStore = defineStore('tabbar', () => {
  // 当前选中的TabBar索引
  const currentIndex = ref(0)

  // 设置当前选中的索引
  const setCurrentIndex = (index: number) => {
    currentIndex.value = index
  }

  return {
    currentIndex,
    setCurrentIndex,
  }
})
